<?php include_once $_SERVER['DOCUMENT_ROOT'] . "/config.php"; ?>
<?php include_once "controller/index.php"; ?>
<?php //include_once $_SERVER['DOCUMENT_ROOT'].'/connection.php'; ?>
<?php session_start(); ?>


<!--/*验证码的session开始，如果不放在前面，有的服务器会出现警告*/-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title><?php include 'module/title.php'; ?></title>
    <link rel="Shortcut Icon" href="asset/logoicon.ico">
    <script type="text/javascript" src="asset/js/viewport.js"></script>
    <link rel="stylesheet" type="text/css" href="asset/css/style.css"/>
</head>


<body>
<div id="width_height">


    <div class="gate_content">
        <div id="logo">
            <img src="asset/image/logo_m.png">
            <h5>企业资源计划系统</h5>
        </div>

<? if (isset($_REQUEST['notice']) && $_REQUEST['notice'] == "nosession") { ?>
    <div style="color: red"> 登录状态异常，请重新登录。</div>
<? } ?>





        <div id="content_form">
            <form id="loginform" name="loginform" method="post" action="" enctype="multipart/form-data">
                <ul>


                    <li><label class="icon_domain"></label>
                        <input type="text" name="domain" alt="企业账号" id="domain"
                               value="<? echo $_domain ?>"
                               placeholder="域名：不含www"/>
                    </li>

                    <li><label class="icon_1"></label>
                        <input type="text" name="username" alt="账号" id="username"
                               value="<? echo $_REQUEST['username'] ?>"
                               placeholder="账号"/>
                    </li>

                    <li><label class="icon_2"></label>
                        <input type="password" name="userpass" id="userpass" alt=""
                               value="<? echo $_REQUEST['userpass'] ?>"
                               placeholder="密码"/>
                    </li>


                    <li>
                        <input type="text" name="code" id="code"/>
                        <img src="../application/verify/z_imgcode.php"
                             onclick='this.src="../application/verify/z_imgcode.php?"+Math.random();'
                             style="cursor:pointer;height: 50px;width: 150px;">
                    </li>



                    <?
                        // 验证码验证
                        if (isset($_REQUEST['code'])) {
                            if ($_REQUEST['code'] == strtolower($_SESSION['yzm'])) {
                                echo "
                                    <script type='text/javascript'>
                                    document.getElementById('loginform').action = 'logincheck.php';
                                    document.getElementById('loginform').submit();
                                    </script>";
                            } else {
                                echo '<script type="text/javascript"> alert("请输入正确的验证码！");</script>';
                            }
                        }
                    ?>

                    <input type="submit" name="submit" id='submit' value="登　陆"/>

                </ul>



                <!--<div class="item box">-->
                <!--    <div class="noaccount" > <a href="register.php"> 立刻注册 </a></div>-->
                <!--    <div class="forget"    >忘记密码</div>-->
                <!--</div>-->


            </form>

            <ul id="foger_regist">
                <!--	  <li>忘记密码</li>
                      <li>注册登录</li>-->
                <!--<li onclick="bangdingweixin()">绑定微信</li>-->
            </ul>


        </div>
    </div>


</div>








<canvas id="Mycanvas"></canvas>
<script type="text/javascript" src="asset/js/animation_bg.js"></script>

</body>
</html>